# -*- coding: utf-8 -*-

from selenium.webdriver.common.by import By

from common.config import cfg, get_url
from webium.base_page import BasePage
from webium.find import Find
from webium.controls.link import Link


class HomePage(BasePage):
    def __init__(self):
        super(HomePage, self).__init__(url=get_url(cfg.wgq.http))

    login_link = Find(Link, By.CSS_SELECTOR, 'a[data-cm-event="login"]')
    """@type : Link"""
    username_link = Find(Link, By.CSS_SELECTOR, 'a.cm-parent-link__current-user>span.cm-parent-link_cutted-text')
    """@type : Link"""
    my_profile_link = Find(Link, By.CSS_SELECTOR, 'a.b-filters-link__mypublication')
    """@type : Link"""
    logout = Find(Link, By.CSS_SELECTOR, 'a.cm-link.js-cm-event')
    """@type : Link"""
